#include<iostream>
#include<string>
using namespace std;
/* 请在这里填写答案 */

class Fruit
{
public:

    Fruit(){
        cout << "Fruit Constructor" << endl;
    }
    Fruit(int w)
    {
        cout << "Fruit Constructor" << endl;
        weight = w;
    }

    virtual void display() {
        cout << "weight=" << weight << endl;
    }

    virtual ~Fruit()
    {
        cout << "Fruit Destructor" << endl;
    }
protected:
    int weight;

};

class Banana : public  Fruit
{
private:
    string origin;
public:
    Banana(string origin ,int weight)
    {
        cout << "Banana Constructor" << endl;
        this->origin = origin;
        this->weight = weight;
    }
    void display()
    {
        cout << "origin=" << origin << ",weight=" << weight << endl;
    }
    ~Banana()
    {
        cout << "Banana Destructor" << endl;
    }

};


/* 请在这里填写答案 */
int main(){
    Fruit *pf=new Banana("Chongqing",10);;
    pf->display();
    delete pf;
    return 0;
}